﻿<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true" CodeBehind="AdList.aspx.cs"
    Inherits="ETongJin.YM.Web.Admin.AdList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">
function CheckAll(obj)
{
var allcheck = document.getElementsByName("id");
for(i=0;i<allcheck.length;i++)
{
allcheck[i].checked = obj.checked;
}
}
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th colspan="6" class="ym12_bti">
                广告管理
            </th>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand"
            OnItemDataBound="Repeater1_ItemDataBound">
            <HeaderTemplate>
                <tr style="text-align: center;">
                    <td class="td2" width="30px">
                        <input id="Checkbox1" type="checkbox" name="chkAll" onclick="CheckAll(this);" />
                    </td>
                    <td width="100" class="td2">
                        广告主
                    </td>
                    <td width="100" class="td2">
                        广告标题
                    </td>
                    <td width="100" class="td2">
                        关键词
                    </td>
                    <td width="100" class="td2">
                        广告状态
                    </td>
                    <td class="td2" style="text-align: left">
                        相关操作
                    </td>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr style="text-align: center;">
                    <td class="td1">
                        <input id="Checkbox1" type="checkbox" name="id" value="<%#Eval("id") %>" />
                         <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("id") %>' />
                    </td>
                    <td class="td1">
                      
                        <asp:HyperLink ID="HyperLink2" NavigateUrl='<%#"Edit.aspx?i="+Eval("userid") %>'
                                        runat="server"><%#Eval("username") %></asp:HyperLink>
                    </td>
                    <td class="td1">
                        <a href="<%#Eval("url") %>" target="_blank">
                            <%#Eval("title")%></a>
                    </td>
                    <td class="td1">
                        <asp:HyperLink ID="hlKeyWord" runat="server" Target="_blank" Text='<%#Eval("keyword") %>'></asp:HyperLink>
                    </td>
                    <td class="td1">
                        <asp:Label ID="lbPosition" runat="server" Text='<%#Eval("adstatus") %>'></asp:Label>
                    </td>
                    <td class="td1" style="text-align: left">
                        <asp:HyperLink ID="HyperLink1" NavigateUrl='<%#"ad.aspx?i="+Eval("id") %>' runat="server">修改</asp:HyperLink>
                        <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="2" CausesValidation="false"
                            OnClientClick="return confirm('您将删除这个广告!!?删除后不可恢复');">删除</asp:LinkButton>
                    </td>
                </tr>
               
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <th colspan="6" style="margin-left:30px;">
                <asp:Button ID="Button1" runat="server" Text="批量删除"  OnClientClick="return confirm('您确定删除选中的记录么?删除后不可恢复');" onclick="Button1_Click" />
            </th>
        </tr>
        <tr>
            <th colspan="6" style="text-align: center;">
                <div id="tnt_pagination">
                    <%= PageStr%></div>
            </th>
        </tr>
    </table>
</asp:Content>
